package com.facebook.games.fa.controller
{
	import com.facebook.games.fa.events.GameEvent;
	import com.facebook.games.fa.view.Game;
	
	import flash.events.EventDispatcher;

	/**
	 * Controlador da Game view
	 * @author Diego Maehler <dmaehler@gmail.com>
	 */
	public class GameController extends EventDispatcher
	{
		
		/**
		 * Game view
		 */
		public var view : Game;
		
		/**
		 * Finaliza o jogo
		 */
		public function endGame () : void
		{
			this.view.dispatchEvent(new GameEvent(GameEvent.END_GAME));
		}
		
		/**
		 * Reinicia o jogo
		 */
		public function restartGame () : void
		{
			this.view.dispatchEvent(new GameEvent(GameEvent.RESTART_GAME));
		}
		
	}
}